﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class Utils {

	public static T GetOrAddComponent<T>(this UnityEngine.GameObject o) where T : Component{
		T t;
		if ((t = o.GetComponent<T> ()) == null) {
			return o.AddComponent<T> ();
		}
		return t;
	}

}
